package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author hpiggy
 * @since 2023-05-31
 */
@TableName("shopping_order")
@ApiModel(value = "ShoppingOrder对象", description = "订单")
@Data
public class ShoppingOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;


    private Long schoolId;

    @ApiModelProperty("学期id")
    private Long studentId;

    @ApiModelProperty("班级id")
    private Long gradeId;

    @ApiModelProperty("班级名称")
    private String gradeName;

    @ApiModelProperty("年级")
    private Integer yearClassId;

    @ApiModelProperty("商品id")
    private Long shoppingId;

    @ApiModelProperty("商品名称")
    private String shoppingName;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("课程数量")
    private Integer courseCount;

    @ApiModelProperty("金额")
    private BigDecimal price;

    private Long shoppingDiscountsId;

    @ApiModelProperty("期数")
    private Integer periods;

    @ApiModelProperty("家长openid")
    private String openid;

    @ApiModelProperty("科目id")
    private Long subjectsId;

    @ApiModelProperty("科目名称")
    private String subjectsName;

    @ApiModelProperty("0待支付，1已支付，2支付失败，3订单取消")
    private Integer status;

    @ApiModelProperty("年份")
    private Integer yearPart;

    @ApiModelProperty("季度（学期）（班级所属学期）")
    private Integer quarterNum;

    @ApiModelProperty("确认学期")
    private Integer affirmQuarterNum;

    private String tradeNo;

    private String channelSendSn;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    private LocalDateTime deletedAt;

    @TableLogic
    private Integer deleted;

}
